/*
package com.lantu.wisdom.common.Config;

import lombok.extern.slf4j.Slf4j;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableAsync;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

*/
/**
 * @Description:
 * @Author: duhui
 * @Date: 2020/8/3 9:36
 *//*

@Slf4j
@Configuration
@EnableAsync
public class TaskPoolConfig {
    @Bean(name = "crawlExecutorPool")
    public ExecutorService crawlExecutorPool() {
        // 获取Java虚拟机的可用的处理器数，最佳线程个数，处理器数*2。根据实际情况调整
        int curSystemThreads = Runtime.getRuntime().availableProcessors() * 2+1;
        log.info("------------系统可用线程池个数：{}" , curSystemThreads);
        // 创建线程池
        ExecutorService pool = Executors.newFixedThreadPool(curSystemThreads);
        return pool;
    }

}
*/
